<?php $this->load->view('header/admin'); ?>
<div id="main">
    <div class="container">
        <div class="span-17 colborder" id="content">
	        <?php if (isset($messages)) echo $messages; ?>
	        <h3>Add Club</h3>
            <form action="" method="post">
		        <div class="box span-16 last">
			        <p>
				        <label for="name">Name: </label> 
				        <?php echo form_input('name',set_value('name', $club->name)); ?>
			        </p>
					<p>
					  <label for="since">Since: </label>
					  <input type="text" id="datepicker" size="10" maxlength="10" name="since" />
					</p>
					<p>
						<label for="description">Description: </label> 
						<?php echo form_textarea(array('name' => 'description', 'cols' => '35', 'rows' => '5'),
						    set_value('description', $club->description)); ?>
					</p>
					<p>
						<label for="website">Website: </label> 
						<?php echo form_input('website',set_value('website', $club->website)); ?>
					</p>
					<p>
						<label for="active">Active: </label> 
						<?php echo form_dropdown('active', array (
						1 => 'Yes',
						0 => 'No'
						), set_value('active', $club->active)); ?></p>
					<p>
						<label for="address_line_1">Address: </label> 
						<?php echo form_input('address_line_1',set_value('address_line_1', $club->address_line_1)); ?>
						<?php echo form_input('address_line_2',set_value('address_line_2', $club->address_line_2)); ?>
					</p>
					<p>
						<label for="location">Location: </label> 
			    		<?php echo form_input('location',set_value('location', $club->location)); ?>
					</p>
					<p>
			            <label for="postcode">Postcode: </label> 
			            <?php echo form_input('postcode',set_value('postcode', $club->postcode)); ?>
					</p>
					<p>
			            <label for="country_code">Country: </label> 
			            <?php echo form_input('country_code',set_value('country_code', $club->country_code)); ?>
					</p>
				</div>
				<div class="span-16">
	                <p><?php echo form_submit('action','Add'); ?></p>
				</div>
	        </form>
        </div> <!-- end content -->
        <?php $this->load->view('menu/admin')?>
    </div> <!-- end container -->
    <script type="text/javascript">
        $(function() {
            $("#datepicker").datepicker({
                dateFormat: 'yy-mm-dd',
                changeMonth: true,
                changeYear: true,
                yearRange: 'c-100:c'
            });
        });
    </script>
</div> <!-- end main -->
<?php $this->load->view('footer/standard');?>
